class DocumentNotification < ActionMailer::Base
  default from: "from@websolution.com"

  def doc_incomplete( client, doc )
    @client = client
    @doc = doc
    mail  to: client.email,
          subject: "New document is assigned to you"
  end

  def doc_pending (doc,client)
    @doc = doc
    @client = client
    mail  to: client.employee.email,
    subject: "#{doc.title} is submitted by #{client.full_name}" if !client.employee.nil?
  
  end

  def doc_review (doc, client, comment)
    @doc = doc
    @client = client
    @comment = comment
    mail  to: client.email,
          subject: "#{doc.title} need update"
  end
 def doc_complete (doc, client)
    @doc = doc
    @client = client
     mail  to: client.email,
     subject: "#{doc.title} completed"
  end

end
